var csInterface = new CSInterface();

// 个人主页
var homePageElement = document.querySelector("#homePage");
homePageElement.addEventListener("click", callHomepage);

function callHomepage() {
  window.cep.util.openURLInDefaultBrowser('https://gitee.com/brzjomo');
}

// 调用函数1
var runButtonSelect = document.querySelector("#btn-select");
runButtonSelect.addEventListener("click", buttonSelect);

// 函数1
function buttonSelect() {
  // 获取布尔-是否直接删除选择项
  var IfDeleteDirectlyElement = document.getElementById("ifDeleteDirectly");
  var ifDeleteDirectly = IfDeleteDirectlyElement.checked;

  // 获取布尔-是否提示选中对象周长
  var ifPromoteItemLengthElement = document.getElementById("ifPromoteItemLength");
  var ifPromoteItemLength = ifPromoteItemLengthElement.checked;

  // 获取限制长度
  var limitLength = document.getElementsByName("limitLength")[0].value;

  csInterface.evalScript('select(' + limitLength + ', ' + ifDeleteDirectly + ', ' + ifPromoteItemLength +')');
}

